
public class PorcupineFib {
	public static final int MAX = 20;
		
	public int Fib(int n){
		int result = 0;
		
		if(n <= 0){
			return 0; 
		}
		
		if(n == 1){
			return 1;
		}
		
			
	    result = Fib(n-1) + Fib(n-2);
		
		
		return result;
	}
	
	

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		PorcupineFib pf = new PorcupineFib();
		
		System.out.println("This program lists the Fibonacci sequence");
//		for(int i = 0; i< MAX; i++)
//		{
//			System.out.println(pf.Fib(i));
//		}
		
		int i = 0;
		while(true){
			if(pf.Fib(i) > 10000){
				break;
			}
			
			System.out.println(pf.Fib(i));
			i++;
		}
		
		

	}

}
